﻿Public Class BETela
  Private _intIdTela As Integer
  Private _strNome As String
  Private _strDescricao As String
  Private _strModulo As String
  ' Permissões da Tela
  Private _booLeitura As Boolean
  Private _booEscrita As Boolean
  Private _booModificacao As Boolean
  Private _booExclusao As Boolean

  Private _lstGrupos As New List(Of BEGrupoAcesso)

  Sub New()
    _intIdTela = 0
    _strNome = ""
    _strDescricao = ""
    _strModulo = ""

    _booLeitura = False
    _booEscrita = False
    _booModificacao = False
    _booExclusao = False
  End Sub

  Sub New(ByVal intIdTela As Integer)
    Me.New()
    _intIdTela = intIdTela
  End Sub

  Sub New(ByVal strNome As String)
    Me.New()
    _intIdTela = 0
    _strNome = strNome
  End Sub

  Sub New(ByVal intIdTela As Integer, ByVal strNome As String, ByVal strDescricao As String, ByVal strModulo As String)
    Me.New()
    _intIdTela = intIdTela
    _strNome = strNome
    _strDescricao = strDescricao
    _strModulo = strModulo
  End Sub

  Public Property IdTela() As Integer
    Get
      Return _intIdTela
    End Get
    Set(ByVal value As Integer)
      _intIdTela = value
    End Set
  End Property

  Public Property Nome() As String
    Get
      Return _strNome
    End Get
    Set(ByVal value As String)
      _strNome = value
    End Set
  End Property

  Public Property Descricao() As String
    Get
      Return _strDescricao
    End Get
    Set(ByVal value As String)
      _strDescricao = value
    End Set
  End Property

  Public Property Modulo() As String
    Get
      Return _strModulo
    End Get
    Set(ByVal value As String)
      _strModulo = value
    End Set
  End Property

  Public Property Leitura() As Boolean
    Get
      Return _booLeitura
    End Get
    Set(ByVal value As Boolean)
      _booLeitura = value
    End Set
  End Property

  Public Property Escrita() As Boolean
    Get
      Return _booEscrita
    End Get
    Set(ByVal value As Boolean)
      _booEscrita = value
    End Set
  End Property

  Public Property Modificacao() As Boolean
    Get
      Return _booModificacao
    End Get
    Set(ByVal value As Boolean)
      _booModificacao = value
    End Set
  End Property

  Public Property Exclusao() As Boolean
    Get
      Return _booExclusao
    End Get
    Set(ByVal value As Boolean)
      _booExclusao = value
    End Set
  End Property

  Public Property GruposAcesso() As List(Of BEGrupoAcesso)
    Get
      Return _lstGrupos
    End Get
    Set(ByVal value As List(Of BEGrupoAcesso))
      _lstGrupos = value
    End Set
  End Property

End Class
